#include <iostream>
using namespace std;
class A
{
public:
    virtual unsigned int sum(unsigned int n)
    {return 0;}
};

A *array[2];

class B: public A
{
	virtual unsigned int sum(unsigned int n)
	{
		return array[!!n]->sum(n-1) +n;
	}
};

class Solution {
public:
    Solution(){++n;sum +=n;}
    static void reset(){
        n = 0; sum = 0;
    }
    static unsigned int n;
    static unsigned int sum;
    int Sum_Solution(int n) {
        Solution::reset();
        Solution *s = new Solution[n];
        delete []s;
        s = nullptr;
        return Solution::sum;
    }
};
unsigned int Solution::n = 0;
unsigned int Solution::sum = 0;





int main()
{
    Solution s;
    cout<<s.Sum_Solution(5)<<endl;
    return 0;

}